<style>
    /*<!--2016/11/03--add-css-upbug-->*/
    .proupload .list{
        margin-bottom: 10px;
    }
    .proupload  .item:first-child:after, .proupload .item:last-child:after{
        right: 10px;
        left: inherit;
    }
    .proupload  .input-label{
        color: #3B3B3B;
    }
    .proupload .item-input{
        border: none;
    }
    .proupload .item-select select{
        color: #3B3B3B;
    }
    .wap-upload.item-select:after{
        margin-top: -8px;
        border-top: 15px solid;
        border-right: 15px solid transparent;
        border-left: 15px solid transparent;
    }
     textarea{
         resize: none;
     }
    .shopperinfo .row + .row{
        margin: 0;

    }
    .shopperinfo-item{
        position: relative;
        background-color: #ffffff;
        padding: 0 15px;
        border-bottom: 1px solid #f0eff5;
        height: 45px;
        font-size: 16px;
        line-height: 45px;
    }
    .shopperinfo-item>div{
        width: 100px;
        color: #3B3B3B;
    }
    .shopperinfo-item>input{
        border: 0;
        width: 100%;
        height: 39px;
        margin-top: 2px;
        color: #3B3B3B;
    }
    .shopperinfo-item>textarea{
        width: 100%;
        padding-top: 10px;
        height: 99px;

    }
    .shopperinfo .shopperinfo-item.mb{
        margin-bottom: 10px;
    }
    .shopperinfo-item.textarea{
        height: 100px;
    }
    .shopperinfo-btn{
        position: absolute;
        bottom: 0;
        width: 100%;
        background-color: #fc353a;
        color: #fff;
        height: 44px;
        text-align: center;
        line-height: 44px;
    }

</style>
<ion-view hide-nav-bar="false" view-title="添加产品">
    <ion-header-bar class="index_head">
        <button class="button button-icon icon ion-android-arrow-back" ng-click="$ionicGoBack()" style="color: #fff"></button>
        <div class="h1 title"> 添加产品</div>
        <button  class="button button-clear button-positive zhuce_head_btn" style="color: #fff;font-size: 14px;" ng-click="saveUpload()" >保存</button>
    </ion-header-bar>
    <ion-content delegate-handle="prouploadScroll" class="wap3-user wap3-center  proupload shopperinfo " ng-class="{'wap3-ios-hade':platform.IOSAPP}">
        <div class="list mt10">

            <div class="shopperinfo-item  textarea " style="border-bottom: 0">
                <textarea rows="15" placeholder="请填写推荐理由（选填）" maxlength="50" ng-model="data.tuijianReson"></textarea>
            </div>
            <div class="shopperinfo-info  text-right">{{50-data.tuijianReson.length}}</div>
            <!--<div style="font-size: 12px;padding: 5px 10px;color: #919191;">在职机构信息</div>-->
     <!---->
            <!--<div class="shopperinfo-item  row">-->
                <!--<div>在职机构</div>-->
                <!--<input placeholder="请输入" ng-model="data.companyName">-->
            <!--</div>-->
  <!---->
        </div>
        <div class="list">

            <label class="item item-input item-select" ng-click="queryclassify()">
                <div class="input-label">
                    产品分类
                </div>
                <div>{{data.productType}}</div>

            </label>

        </div>
        <div class="list">
            <label class="item item-input item-select">
                <div class="input-label">
                    募集状态
                </div>
                <select ng-model="data.saleStatus">
                    <option value="02">预热中</option>
                    <option value="03" selected>募集中</option>
                    <option value="04">本期募满</option>
                    <option value="05">募集结束</option>
                </select>
            </label>
        </div>

        <div class="shopperinfo-item  row">
            <div>产品名称</div>
            <input placeholder="请输入" ng-model="data.productName">
        </div>
        <div class="shopperinfo-item  row">
            <div>募集规模</div>
            <input placeholder="请输入" ng-model="data.issuingScale">
        </div>
        <div class="shopperinfo-item  row">
            <div>产品期限</div>
            <input placeholder="请输入" ng-model="data.dueTime">
        </div>



        <div class="list mt10">

            <label class="item item-input item-select">
                <div class="input-label">
                    付息方式
                </div>
                <select ng-model="data.paymentInterestType">
                    <option value="02">按季付息</option>
                    <option value="03" selected>半年付息</option>
                    <option value="04">按年付息</option>
                    <option value="05">到期付本息</option>
                </select>
            </label>

        </div>
        <div style="font-size: 16px;padding: 5px 10px;color: #3B3B3B;">产品收益</div>


        <!--<div class="list apply-shelves" ng-if="upload.rebateType == '2'" style="margin-bottom: 0;">-->
            <!--<label class="item item-input">-->
                <!--<span class="input-label">预期年化(%)</span>-->
                <!--<input type="text" name="rebateRate" ng-model="upload.rebateRate" placeholder="请精确到小数点后两位">-->
            <!--</label>-->
        <!--</div>-->

        <div style="position: relative;padding-right: 20%;" class="apply-shelves mt10 bg-fff "  ng-repeat="r in rebateRateList">
                <div class="item item-input" style="border-bottom: 2px solid #f0eff5">
                    <span class="input-label">金额(万元)</span>
                    <div><input style="background-color: #fff" type="text" placeholder="请输入数字"  maxlength="4" name="begin" ng-model="r.minAmount"></div>
                </div>
                <label class="item item-input">
                    <span class="input-label">预期年化</span>
                    <input type="text" name="rebateRate" ng-model="r.revenue" placeholder="请输入预期年化">
                </label>

                <div  ng-show="rebateRateList.length > 1" style="    position: absolute;
    right: 0;
    z-index: 999;
    top: 0;
    height: 100%;
    width: 50px;    line-height: 90px;" ng-click="removeRebateRate($index)">
                    <img style="vertical-align: middle" width="18px" height="18px" src="img/shops/cut.png"/>
                </div>
            </div>


        <div class=" " >
            <label class="item item-input rateRange" ng-click="addRebateRate()" style="color: #fe7e01;text-align: right;padding: 15px;padding-right: 34px;border: none;background-color: #f0eff5;">
                添加产品收益<img style="vertical-align: middle;margin-left: 5px" width="18px" height="18px" src="img/shops/classadd.png"/>
            </label>
            <!--<label class="item item-input rateRange" ng-show="rebateRateList.length > 1" ng-click="removeRebateRate()">-删除金额范围</label>-->
        </div>

        <!--<div class="list apply-shelves" style="text-align: center; font-size: 12px; color: #9E9E9E;">目前支持信托、集合资管上架，详情请看<a href="javascript:" ng-click="modal.uploadExplain()">《上架说明》</a></div>-->

        <div class="shopperinfo-item  textarea " style="border-bottom: 0">
            <textarea rows="15" placeholder="请填写资金用途（选填）"  ng-model="data.fundUse"></textarea>
        </div>


        <div class="shopperinfo-item mt10  textarea " style="border-bottom: 0">
            <textarea rows="15" placeholder="请填写还款来源（选填）"  ng-model="data.payment"></textarea>
        </div>


        <div class="shopperinfo-item mt10  textarea " style="border-bottom: 0">
            <textarea rows="15" placeholder="请填写风险控制（选填）"  ng-model="data.reskManagement"></textarea>
        </div>


        <div style="font-size: 16px;padding: 5px 10px;color: #3B3B3B;margin-top: 10px">更多详情</div>

        <div ng-repeat="item in moreDetail">

            <div ng-if="item.relType == 1" class="mt10 bg-fff">
                <div class="shopperinfo-item mt10  textarea " style="border-bottom: 0">
                    <textarea rows="15" placeholder="请填写内容" ng-model="item.relContent"></textarea>
                </div>
                <div style="padding-bottom: 5px" ng-click="removeaddInput($index)" class="text-right "><img style="vertical-align: middle;margin-right: 5%" width="18px" height="18px" src="img/shops/cut.png"/></div>

            </div>
            <div ng-if="item.relType == 2" class="mt10 bg-fff">
                <div  class="shopperinfo-item mt10 text-center  textarea " style="border-bottom: 0;height: auto">
                    <div ng-if="!item.relImage" ng-click="cropPhotoShopHome($index)" style="margin:0 auto;line-height: 20px;padding-top: 20px">
                        <img src="img/shops/shops4.png" width="62px" />
                        <p>点击添加图片</p>
                    </div>
                    <img ng-if="item.relImage" ng-src="{{item.relImage | getUserHeadImg}}?x-oss-process=image/resize,w_750" width="100%"/>
                </div>
                <div style="padding-bottom: 5px" ng-click="removeaddInput($index)"  class="text-right"><img style="vertical-align: middle;margin-right: 5%" width="18px" height="18px" src="img/shops/cut.png"/></div>
            </div>

        </div>

        <div class="row text-center mt10  bg-fff" style="padding: 0;height: 40px;line-height: 30px">
            <div ng-click="addTextInput()" class="col" style="background-color: #e6e6e6;color: #fe7e01;border-right: 1px solid #fff">
                <img style="vertical-align: text-top;" src="img/shops/shop3.png" width="18px" />
                添加文字
            </div>
            <div ng-click="addImgInput()" class="col" style="background-color: #e6e6e6;color: #fe7e01">
                <img style="vertical-align: text-top;" src="img/shops/shop2.png" width="18px" />
                添加图片
            </div>
        </div>
        <!--<a style="    border-bottom: 1px solid #f0eff5;" ui-sref="proAddMore"-->
           <!--class="item  item-icon-right">-->
            <!--更多详情-->
            <!--<i class="icon myself-index-icon"-->
               <!--style="background-image: url(img/icon/myindex/right.png);"></i>-->
        <!--</a>-->
        <!--<div class="list apply-shelves" style="text-align: center;">-->
            <!--<button class="button button-default" ng-click="saveUpload()" style="width: 95%; max-width: 480px; background-color: #f93841; color: #fff">确认提交</button>-->
        <!--</div>-->

    </ion-content>
    <div ng-show="classifyIssle" style="position: absolute;width: 100%;background-color: rgba(0, 0, 0, 0.51);height: 100%;z-index: 999">
        <div style="position: absolute;bottom: 0;background-color: #fff;width: 100%">
            <div style="background-color: #e6e6e6;padding: 15px">分类至（将产品分类、可以方便产品管理维护）</div>
            <div style="height: 300px;overflow: auto">
                <div ng-repeat="i in classifyList" ng-click="sleClassify($index,i.typeValue)" style="border-bottom: 1px solid #f0eff5">
                    <div class="row">
                        <div class="col">
                            <img ng-show="sleindex == $index" src="img/shops/sle.png" width="10px" />
                            <img ng-show="sleindex != $index" src="img/shops/nosle.png" width="10px" />
                            {{i.typeValue}}</div>
                    </div>
                </div>
            </div>


            <div style="padding: 10px;text-align: center" ng-click="addclassify()">
                <img style="vertical-align: middle" width="18px" height="18px" src="img/shops/classadd.png"/>添加分类
            </div>
            <div class="row text-center " style="padding: 0;    height: 40px;
    line-height: 35px;">
                <div ng-click="classifyIssle=false" class="col" style="background-color: #e6e6e6;color: #fe7e01">取消</div>
                <div ng-click="confirmSle()" class="col" style="background-color: #fe7e01;color: #fff">确认</div>
            </div>
        </div>
    </div>

</ion-view>
